\(\int \frac {a+b \arctan (c x^2)}{x} \, dx\) [64]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 39 \[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=a \log (x)+\frac {1}{4} i b \operatorname {PolyLog}\left (2,-i c x^2\right )-\frac {1}{4} i b \operatorname {PolyLog}\left (2,i c x^2\right ) \]

[Out]

a*ln(x)+1/4*I*b*polylog(2,-I*c*x^2)-1/4*I*b*polylog(2,I*c*x^2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4944, 4940, 2438} \[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=a \log (x)+\frac {1}{4} i b \operatorname {PolyLog}\left (2,-i c x^2\right )-\frac {1}{4} i b \operatorname {PolyLog}\left (2,i c x^2\right ) \]

[In]

Int[(a + b*ArcTan[c*x^2])/x,x]

[Out]

a*Log[x] + (I/4)*b*PolyLog[2, (-I)*c*x^2] - (I/4)*b*PolyLog[2, I*c*x^2]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4944

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/n, Subst[Int[(a + b*ArcTan[c*x])^p
/x, x], x, x^n], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {a+b \arctan (c x)}{x} \, dx,x,x^2\right ) \\ & = a \log (x)+\frac {1}{4} (i b) \text {Subst}\left (\int \frac {\log (1-i c x)}{x} \, dx,x,x^2\right )-\frac {1}{4} (i b) \text {Subst}\left (\int \frac {\log (1+i c x)}{x} \, dx,x,x^2\right ) \\ & = a \log (x)+\frac {1}{4} i b \operatorname {PolyLog}\left (2,-i c x^2\right )-\frac {1}{4} i b \operatorname {PolyLog}\left (2,i c x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00 \[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=a \log (x)+\frac {1}{4} i b \operatorname {PolyLog}\left (2,-i c x^2\right )-\frac {1}{4} i b \operatorname {PolyLog}\left (2,i c x^2\right ) \]

[In]

Integrate[(a + b*ArcTan[c*x^2])/x,x]

[Out]

a*Log[x] + (I/4)*b*PolyLog[2, (-I)*c*x^2] - (I/4)*b*PolyLog[2, I*c*x^2]

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.75 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.62

method result size
default \(a \ln \left (x \right )+b \ln \left (x \right ) \arctan \left (c \,x^{2}\right )-\frac {b \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} \textit {\_Z}^{4}+1\right )}{\sum }\frac {\ln \left (x \right ) \ln \left (\frac {\textit {\_R1} -x}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -x}{\textit {\_R1}}\right )}{\textit {\_R1}^{2}}\right )}{2 c}\) \(63\)
parts \(a \ln \left (x \right )+b \ln \left (x \right ) \arctan \left (c \,x^{2}\right )-\frac {b \left (\munderset {\textit {\_R1} =\operatorname {RootOf}\left (c^{2} \textit {\_Z}^{4}+1\right )}{\sum }\frac {\ln \left (x \right ) \ln \left (\frac {\textit {\_R1} -x}{\textit {\_R1}}\right )+\operatorname {dilog}\left (\frac {\textit {\_R1} -x}{\textit {\_R1}}\right )}{\textit {\_R1}^{2}}\right )}{2 c}\) \(63\)
risch \(\frac {i \ln \left (-i c \,x^{2}+1\right ) \ln \left (x \right ) b}{2}-\frac {i \ln \left (x \right ) \ln \left (1-i x \sqrt {-i c}\right ) b}{2}-\frac {i \ln \left (x \right ) \ln \left (1+i x \sqrt {-i c}\right ) b}{2}-\frac {i \operatorname {dilog}\left (1-i x \sqrt {-i c}\right ) b}{2}-\frac {i \operatorname {dilog}\left (1+i x \sqrt {-i c}\right ) b}{2}+a \ln \left (x \right )-\frac {i \ln \left (i c \,x^{2}+1\right ) \ln \left (x \right ) b}{2}+\frac {i \ln \left (x \right ) \ln \left (1+i x \sqrt {i c}\right ) b}{2}+\frac {i \ln \left (x \right ) \ln \left (1-i x \sqrt {i c}\right ) b}{2}+\frac {i \operatorname {dilog}\left (1+i x \sqrt {i c}\right ) b}{2}+\frac {i \operatorname {dilog}\left (1-i x \sqrt {i c}\right ) b}{2}\) \(182\)

[In]

int((a+b*arctan(c*x^2))/x,x,method=_RETURNVERBOSE)

[Out]

a*ln(x)+b*ln(x)*arctan(c*x^2)-1/2*b/c*sum(1/_R1^2*(ln(x)*ln((_R1-x)/_R1)+dilog((_R1-x)/_R1)),_R1=RootOf(_Z^4*c
^2+1))

Fricas [F]

\[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=\int { \frac {b \arctan \left (c x^{2}\right ) + a}{x} \,d x } \]

[In]

integrate((a+b*arctan(c*x^2))/x,x, algorithm="fricas")

[Out]

integral((b*arctan(c*x^2) + a)/x, x)

Sympy [F]

\[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=\int \frac {a + b \operatorname {atan}{\left (c x^{2} \right )}}{x}\, dx \]

[In]

integrate((a+b*atan(c*x**2))/x,x)

[Out]

Integral((a + b*atan(c*x**2))/x, x)

Maxima [F]

\[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=\int { \frac {b \arctan \left (c x^{2}\right ) + a}{x} \,d x } \]

[In]

integrate((a+b*arctan(c*x^2))/x,x, algorithm="maxima")

[Out]

b*integrate(arctan(c*x^2)/x, x) + a*log(x)

Giac [F]

\[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=\int { \frac {b \arctan \left (c x^{2}\right ) + a}{x} \,d x } \]

[In]

integrate((a+b*arctan(c*x^2))/x,x, algorithm="giac")

[Out]

integrate((b*arctan(c*x^2) + a)/x, x)

Mupad [B] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.82 \[ \int \frac {a+b \arctan \left (c x^2\right )}{x} \, dx=a\,\ln \left (x\right )-\frac {b\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x^2\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1{}\mathrm {i}\,c\,x^2+1\right )\right )\,1{}\mathrm {i}}{4} \]

[In]

int((a + b*atan(c*x^2))/x,x)

[Out]

a*log(x) - (b*(dilog(1 - c*x^2*1i) - dilog(c*x^2*1i + 1))*1i)/4